﻿@model DBMS.Models.Column

@{
    ViewBag.Title = "CreateColumn";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Add New Column</h2>

@using (Html.BeginForm())
{
    string databaseId = ViewBag.Database.Index.ToString();
    string tableId = ViewBag.Table.Index.ToString();
    
    SelectList select = ViewBag.Types;
    
    @Html.Hidden("databaseId", databaseId)
    @Html.Hidden("tableId", tableId)

    <div>@Html.LabelFor(m => m.Name)</div>
    <div>@Html.TextBoxFor(m => m.Name)</div>
    
    <div>@Html.LabelFor(m => m.Type)</div>
    <div>@Html.DropDownListFor(m => m.Type, select)</div>
    
    <input type="submit" value="Save" />
}

